class Solution {
public:
    vector<string> removeAnagrams(vector<string>& words) {
        map<char,int> old,now;
        vector<string> ans;
        for(int i = 0;i < words.size();i++){
            for(char c : words[i]){
                now[c]++;
            }
            bool t = false;
            for(int i = 'a';i <= 'z';i++){
                if(now[i] != old[i]){
                    t = true;
                    break;
                }
            }
            if(t){
                ans.push_back(words[i]);
            }else{

            }
            old = now;
            now.clear();
        }
        return ans;
    }
};